﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>
<%
if sid="Null" then
Response.Redirect "/login.asp?sid=" & sidd & "&url=/diy/Transfmp3.asp"
Response.end
end if
bitttt=qingtian.confff("bit")
bittt=conn.execute("select money from [qingtian_user] where sid='"&qingtian.Formatsid(sid)&"'")("money")
select case v
case "0"
we0="<br/>"
hr="-----------<br/>"
%>
<card title="倒影文字制作"><p align="<%=qingtian.px%>">
<%
case "1"
zi="<span style=""color:#FF5500"">"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
we1="</div>"
%>
<title>倒影文字制作</title>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%

End Select
%>
<%=qingtian.qingsav("10086")%>
<%
on error resume next
Dim fs, f, f1, fc,cs,i,fsod,Filedel
i=0 
Filepath=Server.MapPath("/diy/Images/")
Set fs = CreateObject("Scripting.FileSystemObject") 
Set f = fs.GetFolder(Filepath)
Set fc = f.Files
For Each f1 in fc
i=i+1
Next
If i>30 Then
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(Filepath)
Set fc = f.Files
For Each f1 in fc
Filedel=Filepath&"/"&f1.name
set fsod = createobject("scripting.filesystemobject")
If (fsod.fileexists(Filedel)) Then
fsod.deletefile(Filedel)
End If
set fsod = Nothing
i=i+1
Next
End If
Response.Write(""&dao&"=倒影文字制作="&we0&""&we&"")
if Request.QueryString("act")=1 then
if session("uurl")<>"" then
Response.Write qingtian.touxian(session("uurl"))
else
Response.Write "设为头像失败!"
end if
session("uurl")=""
Response.Write "<br/>"
end if
Dim backurl,mo2,mob,ii,filename1,cc
filename1="MetalImage.asp"	'本文件名
cc=clng(request("cc"))
backurl=request("backurl")
cc=clng(request("cc"))
backurl=Replace(backurl,"@@","&")
If left(backurl,1)<>"/" Then backurl="/"&backurl
mo2=split(backurl,".")
mob=lcase(mo2(ubound(mo2)))	'字符变小写参数前加
ii="jpg|gif|bmp|jpeg|peg|png|jpge|mid|midi|mmf|amr|img|adp|m4a|mp3|aac|wav|wma|ogg|avi|mp4|3gp|wmv|rm|rmvb|dat|mpg|asf|umd|txt|chm|brm|prc|pdb|mdx|trc|sis|sisx|jar|jad|cab|mpkg|hme|ski|thm|uiq|nth|utz|mtf|sdt|tsk|nec|nes|gba|gb|gbc|gba|fba|md|sfc|smc|lrc|nol|rar|zip|7z|emz|pdf|pdg"
If instr(ii,mob)>0 Then
Response.redirect "http://www.czxiu.com"&backurl
Response.End
End If
%>
<%
text1=server.urlencode(TRim(Request("text1")))
If text1<>"" Then
If bittt<bitttt and qingtian.vip(qingtian.nid)<>"VIP会员" Then 
Response.Write "出错了！你的"&qingtian.bi&"不够哦！"
else
if len(text1)>1120 then
Response.Write "错误，最大支持文字1120个字符！<br/>"
Else
Color=Request("Color")
FontZT=Request("FontZT") 
FontSize=Request("FontSize")
Gradient1=Request("Gradient1")
BackgroundImage=Request("BackgroundImage")
FileFormat=Request("FileFormat")
If Color4="1" Then
If BackgroundColor_red="" Then BackgroundColor_red="255"
If BackgroundColor_green="" Then BackgroundColor_green="0"
If BackgroundColor_blue="" Then BackgroundColor_blue="0"
If BackgroundColor_hex="" Then BackgroundColor_hex="ff0000"	'红色
ElseIf Color4="2" Then
If BackgroundColor_red="" Then BackgroundColor_red="255"
If BackgroundColor_green="" Then BackgroundColor_green="153"
If BackgroundColor_blue="" Then BackgroundColor_blue="204"
If BackgroundColor_hex="" Then BackgroundColor_hex="ff99cc"	'粉色
ElseIf Color4="3" Then
If BackgroundColor_red="" Then BackgroundColor_red="0"
If BackgroundColor_green="" Then BackgroundColor_green="0"
If BackgroundColor_blue="" Then BackgroundColor_blue="0"
If BackgroundColor_hex="" Then BackgroundColor_hex="000000"	'黑色
ElseIf Color4="4" Then
If BackgroundColor_red="" Then BackgroundColor_red="0"
If BackgroundColor_green="" Then BackgroundColor_green="0"
If BackgroundColor_blue="" Then BackgroundColor_blue="255"
If BackgroundColor_hex="" Then BackgroundColor_hex="0000ff"	'蓝色
ElseIf Color4="5" Then
If BackgroundColor_red="" Then BackgroundColor_red="255"
If BackgroundColor_green="" Then BackgroundColor_green="255"
If BackgroundColor_blue="" Then BackgroundColor_blue="0"
If BackgroundColor_hex="" Then BackgroundColor_hex="ffff00"	'黄色
ElseIf Color4="6" Then
If BackgroundColor_red="" Then BackgroundColor_red="255"
If BackgroundColor_green="" Then BackgroundColor_green="0"
If BackgroundColor_blue="" Then BackgroundColor_blue="255"
If BackgroundColor_hex="" Then BackgroundColor_hex="ff00ff"	'紫色
ElseIf Color4="7" Then
If BackgroundColor_red="" Then BackgroundColor_red="255"
If BackgroundColor_green="" Then BackgroundColor_green="20"
If BackgroundColor_blue="" Then BackgroundColor_blue="147"
If BackgroundColor_hex="" Then BackgroundColor_hex="ff1493"	'红紫
ElseIf Color4="8" Then
If BackgroundColor_red="" Then BackgroundColor_red="0"
If BackgroundColor_green="" Then BackgroundColor_green="255"
If BackgroundColor_blue="" Then BackgroundColor_blue="0"
If BackgroundColor_hex="" Then BackgroundColor_hex="00ff00"	'绿色
ElseIf Color4="9" Then
If BackgroundColor_red="" Then BackgroundColor_red="255"
If BackgroundColor_green="" Then BackgroundColor_green="255"
If BackgroundColor_blue="" Then BackgroundColor_blue="255"
If BackgroundColor_hex="" Then BackgroundColor_hex="FFFFFF"	' 白色
End If
t_sks=1200
t_text=Application(filename1 & sid & curl & text1 & id1)
If t_text="" or DateDiff("s",t_text,now())>t_sks Then		'缓存为空时，读取远程数据
Url="http://zh-cn.cooltext.com/Logo-Design?LogoID=10&Text=" & Text1 & "&Font=" & FontZT & "&FontSize=" & FontSize & "&Gradient1=" & Gradient1 & "&BackgroundColor_red=" & BackgroundColor_red & "&BackgroundColor_green=" & BackgroundColor_green & "&BackgroundColor_blue=" & BackgroundColor_blue & "&BackgroundColor_hex=" & BackgroundColor_hex & "&BackgroundImage=" & BackgroundImage & "&FileFormat=" & FileFormat & "&IsRender=true&cmHex=FFFFFF&cmHue=0"	'传送过去的内容
wstr=qingtian.getHTTPPage2(url,Data)
start=Instr(wstr,"<a href=""http://cooltext.com")
over=Instr(wstr,"English</a>")+11
body=mid(wstr,start,over-start)
'以下替换内容
body = replace(body,Chr(10),"")
body = replace(body,Chr(13),"")
body = replace(body,"""","'")
body = replace(body,vbndwline,"")
body = replace(body,vbLf,"")
body = replace(body,vbCr,"")
'-------------------------------------
	Set re=new RegExp
	re.IgnoreCase =true
	re.Global=True
	re.pattern="<a href=([\s\S]+?)RenderID=(\d+?)'([\s\S]+?)</a>"
	RenderID= re.Replace(body,"$2")
	body= re.Replace(body,"")
	set re=Nothing

'-------------------------------------
Url="http://zh-cn.cooltext.com/Render-Graphic?RenderID=" & RenderID & ""	'传送过去的内容
wstr=qingtian.getHTTPPage2(url,Data)
start=Instr(wstr,"<p>")+3
over=Instr(wstr,"下载图片</a>")+8
body=mid(wstr,start,over-start)
'以下替换内容
body = replace(body,Chr(10),"")
body = replace(body,Chr(13),"")
body = replace(body,"""","'")
body = replace(body,vbndwline,"")
body = replace(body,vbLf,"")
body = replace(body,vbCr,"")
'-------------------------------------
	Set re=new RegExp
	re.IgnoreCase =true
	re.Global=True
	re.pattern="<a href='(.+?)'><img src='(.+?)'[\s\S]+?下载图片</a>"
	body= re.Replace(body,"$2")
	re.pattern="<img src='(.+?)'\s*>.+?</a>"
	body= re.Replace(body,"$1")
	re.pattern="<img src='(.+?)'.+?</a>"
	body= re.Replace(body,"$1")
	re.pattern=""
	body= re.Replace(body,"")
	re.pattern=""
	body= re.Replace(body,"")
	set re=Nothing
'-------------------------------------
If len(body)<1 Then
Response.Write "对不起，由于网络原因数据获取失败，请稍候再试！<br/>"
Else
'Application(filename1 & sid & curl & name & id)=body
'Response.Write body
'End If
'Else '直接输出缓存
'Response.Write t_text
'End If
'Response.Write "<br/>"
'End If
'End If
%>
<%
RemoteFileUrl ="" & body & "" 
FileExt = right(RemoteFileUrl,4) 
randomize
ranNum = int(9*10^3*rnd)+10^3
dtNow = Now()
FileName = year(date) & month(date) & day(date) & "0" & minute(now()) & second(now()) & "_" & Replace(Request.ServerVariables("Server_NAME"),".",".") & FileExt
LocalFileName = "/diy/images/" 
If right(LocalFileName,1) <> "/" Then LocalFileName = LocalFileName & "/"
SaveFile = server.mappath(LocalFileName & FileName)
SaveRemoteFile SaveFile,RemoteFileUrl 
saveimg=LocalFileName & FileName 
uurl=saveimg
session("uurl")=uurl
Dim filetest,filesize
set filetest=server.CreateObject("Scripting.FileSystemObject")
filesize=filetest.GetFile(server.MapPath(uurl)).size
If filesize<>"" and filesize>0 Then
if qingtian.vip(qingtian.nid)="VIP会员" then
qingtian.addong("在[url=/diy/MetalImage.asp?sid=[sid]]倒影文字制作[/url]制作了签名")
Response.Write "签名制作成功，文件大小为" & FormatNumber(filesize/1024,1) & "KB<br/>"
Response.Write "<img src='" & uurl & "' alt='Load...'/><br/>"
Response.Write "<a href='" & uurl & "'>免费下载</a>.<a href='" & filename1 & "?act=1&amp;sid=" & sidd & "'>设为头像</a><br/>"
else
qingtian.payy("-"&bitttt)
qingtian.addong("在[url=/diy/MetalImage.asp?sid=[sid]]倒影文字制作[/url]制作了签名")
Response.Write "签名制作成功，文件大小为" & FormatNumber(filesize/1024,1) & "KB<br/>系统自动扣除你"&bitttt&""&qingtian.bi&"<br/>你现在的"&qingtian.bi&":"&bittt&"<br/>"
Response.Write "<img src='" & uurl & "' alt='Load...'/><br/>"
Response.Write "<a href='" & uurl & "'>免费下载</a>.<a href='" & filename1 & "?act=1&amp;sid=" & sidd & "'>设为头像</a><br/>"
end if
Else
Response.Write "对不起，由于网络原因图片获取失败，请稍候再试！<br/>"
End If
set filesize=nothing
set filetest=nothing
End If
End If
End If
End If
End If
%>
<%=we1%><%=hr%><%=sou%>注意:<%=zi%>普通会员每次制作系统自动扣除<%=bitttt%><%=qingtian.bi%>(VIP会员免费制作)<%=zi0%><%=we0%>
<%
        if v=1 then
	%>
        <form action="<%=filename1%>?sid=<%=sidd%>" method="post">
<%=we%>
输入文字<br/>
<textarea name="text1" rows="3"/></textarea><br/>
        <%
        else
	%>
输入文字<br/>
<input name="text1" type="text" value=""/><br/>
        <%
        end if
        %>
字体选择<br/>
<select name="FontZT" value="11130">
<option value="">默认字体</option>
<option value="11092">仿宋繁</option>
<option value="11126">仿宋體一標準</option>
<option value="11096">勘亭流繁</option>
<option value="11122">新宋体</option>
<option value="11130">新潮體一波浪</option>
<option value="11118">明體 TSC FMing</option>
<option value="11146">明體注音</option>
<option value="11072">明體破音</option>
<option value="11074">明體繁</option>
<option value="11070">楷體注音</option>
<option value="11138">標楷體一空心</option>
<option value="11134">波卡體一空陰</option>
<option value="11144">海報體一半天水</option>
<option value="11084">特圓體繁</option>
<option value="11132">特明體一標準</option>
<option value="11078">特明體繁</option>
<option value="11088">特黑體繁</option>
<option value="11094">空疊圓繁</option>
<option value="11142">粗圓體一雙空</option>
<option value="11076">粗明體繁</option>
<option value="11110">粗楷体简</option>
<option value="11128">粗鋼體一標準</option>
<option value="11140">粗黑體一實陰</option>
<option value="11082">細圓體繁</option>
<option value="11068">細明體</option>
<option value="11124">細明體繁</option>
<option value="11086">細黑體繁</option>
<option value="11136">綜藝體一雙空陰</option>
<option value="11098">綜藝體繁</option>
<option value="11116">细新宋简</option>
<option value="11102">行書繁</option>
<option value="11080">超明體繁</option>
<option value="11106">超黑體俏皮動物</option>
<option value="11104">酷儷海報</option>
<option value="11148">酷正海報</option>
<option value="11108">鋼筆行楷繁</option>
<option value="11090">隸書繁</option>
<option value="11100">顏楷體繁</option>
<option value="11112">魏碑简</option>
<option value="11120">黑体 Sim Hei</option>
</select><br/>
文字大小<br/>
<input name="FontSize" type="text" maxlength="2" format="*N" size="6" value="50"/><br/>
字体颜色<br/>
<select name="Gradient1" value="Full+saturation+spectrum+CW">
<option value="Full+saturation+spectrum+CW">五颜六色渐变CW</option>
<option value="Full+saturation+spectrum+CCW">五颜六色渐变CCW</option>
<option value="Mexican+flag+smooth">光滑的墨西哥国旗</option>
<option value="German+flag+smooth">光滑德国的旗子</option>
<option value="German+flag">德国的旗子</option>
<option value="French+flag">法国旗子</option>
<option value="Pastels">柔和的淡色彩</option>
<option value="French+flag+smooth">光滑法国的旗子</option>
<option value="Tube+Red">管红色</option>
<option value="Tropical+Colors">热带颜色</option>
<option value="Four+bars">黑白相间</option>
<option value="Mexican+flag+smooth">光滑的墨西哥国旗</option>
<option value="Romanian+flag">罗马尼亚旗子</option>
<option value="Shadows+1">阴影1</option>
<option value="Shadows+2">阴影2</option>
<option value="Shadows+3">阴影3</option>
<option value="Blinds">黑白窗帘</option>
<option value="Flare+Radial+101">火光辐形101</option>
<option value="Flare+Radial+102">火光辐形102</option>
<option value="Flare+Radial+103">火光辐形103</option>
<option value="Blue+Green">蓝绿色</option>
</select><br/>
背景颜色<br/>
<select name="Color" value="9">
<option value="1">红色</option>
<option value="2">粉色</option>
<option value="3">黑色</option>
<option value="4">蓝色</option>
<option value="5">黄色</option>
<option value="6">紫色</option>
<option value="7">红紫</option>
<option value="8">绿色</option>
<option value="9">白色</option>
</select><br/>
背景图片<br/>
<select name="BackgroundImage" value="0">
<option value="0">透明纯色背景</option>
<option value="1">深蓝色按纽</option>
<option value="2">灰白色磨沙</option>
<option value="3">黑色背景</option>
<option value="4">灰白三角菱形</option>
<option value="5">花岗岩背景</option>
<option value="6">黄色米猎状背景</option>
<option value="9">枯木皮裂痕</option>
<option value="12">钢质裂痕</option>
<option value="15">四粒水珠</option>
<option value="46">黄土裂痕</option>
<option value="48">蓝黄棋子</option>
<option value="51">幽幽绿草</option>
<option value="52">绿叶背景</option>
<option value="53">绿色枫叶</option>
<option value="54">红色枫叶</option>
<option value="56">雷鸣闪电</option>
<option value="57">火焰霞光</option>
<option value="78">黑白阁子</option>
<option value="82">蓝天白云</option>
<option value="87">银河星系</option>
<option value="94">蓝色石墙</option>
<option value="99">妖娆的花朵</option>
<option value="102">棕绳编织</option>
<option value="112">木质背景1</option>
<option value="113">木质背景2</option>
<option value="114">木质背景3</option>
<option value="115">木质背景4</option>
<option value="116">木质背景5</option>
<option value="117">木质背景6</option>
<option value="118">木质背景7</option>
<option value="63">木质背景8</option>
<option value="64">木质背景9</option>
</select><br/>
格式<select name="FileFormat" value="6">
<option value="1">.gif</option>
<option value="2">.gif带透明度</option>
<option value="3">.gif透明无颤抖</option>
<option value="4">.jpg</option>
<option value="5">.png</option>
<option value="6">.png带透明度</option>
</select><br/>
        <%
        if v=0 then
Response.Write "<anchor title=""submit"">提交制作<go href=""" & filename1 & "?sid=" & sidd & """ method=""post"">"
%>
<postfield name="text1" value="$(text1)"/>
<postfield name="FontZT" value="$(FontZT)"/>
<postfield name="FontSize" value="$(FontSize)"/>
<postfield name="Gradient1" value="$(Gradient1)"/>
<postfield name="Color" value="$(Color)"/>
<postfield name="BackgroundImage" value="$(BackgroundImage)"/>
<postfield name="FileFormat" value="$(FileFormat)"/>
</go>
</anchor><br/>
        <%
        else
	%><%=we1%>
        <input type="submit" value="提交制作"/>
        </form><br/>
	<%
	end if
	%>
<%=we%><%=hr%>
快告诉你的朋友来这里玩玩吧,古话说的好,独乐乐不如众乐乐.<%=we0%>
<%=sou%><a href='index.asp?sid=<%=sidd%>'>返回制作首页</a><%=we0%> 
<%
End function
Sub SaveRemoteFile(LocalFileName,RemoteFileUrl)
Dim Ads,Retrieval,GetRemoteData
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", RemoteFileUrl, False, "", ""
.Send
GetRemoteData = .ResponseBody
End With
Set Retrieval = Nothing
Set Ads = Server.CreateObject("Adodb.Stream")
With Ads
.Type = 1
.Open
.Write GetRemoteData
.SaveToFile LocalFileName,2
.Cancel()
.Close()
End With
Set Ads=nothing
End sub
%>
